﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HotelMatchUtility.Comparer
{
    public class HotelCompareBase:ICompareCondition
    {
        /// <summary>
        /// 条件名称
        /// </summary>
        public string ConditionName { get; set; }

        /// <summary>
        /// 是否 精确匹配
        /// T:精确匹配
        /// F:相似匹配
        /// </summary>
        public bool IsExactCondition { get; set; }

        /// <summary>
        /// 是否排他
        /// T:匹上后,右侧ToCompare数据从对比表中移除
        /// F:不用删除
        /// </summary>
        public bool IsExclusiveCondition { get; set; }

        /// <summary>
        /// 比上后 左侧Target是否继续
        /// </summary>
        public bool TargetIsContinue { get; set; }

        /// <summary>
        /// 子类来实现
        /// </summary>
        /// <param name="hotelTarget"></param>
        /// <param name="hotelToCompare"></param>
        /// <returns></returns>
        public virtual bool DoCompare(Entity.HotelEntity hotelTarget, Entity.HotelEntity hotelToCompare)
        {
            throw new NotImplementedException();
        }

        public bool GetIsExactCondition()
        {
            return IsExactCondition;
        }

        public bool GetIsExclusiveCondition()
        {
            return IsExclusiveCondition;
        }

        public bool GetTargetIsContinue()
        {
            return TargetIsContinue;
        }

        public string GetName()
        {
            return ConditionName;
        }


        public void SetTargetIsContinue(bool targetContinue)
        {
            this.TargetIsContinue = targetContinue;
        }
    }
}
